
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main.xhtml">

	<ui:define name="body">
		<h:form prependId="false">
			<p:fieldset legend="#{messages['notaFiscal.label']}"
				toggleable="true" toggleSpeed="500">
				<h:panelGrid id="fieldsnotaFiscal" columns="3">

					<h:outputLabel value="#{messages['notaFiscal.label.chaveNfe']}: "
						for="chaveNfe" styleClass="text-input" />

					<h:inputText id="chaveNfe"
						value="#{notaFiscalEditMB.bean.chaveNfe}"
						title="#{messages['notaFiscal.alt.chaveNfe']}" disabled="true"
						size="43" />

					<p:message for="chaveNfe" />

					<h:outputLabel
						value="#{messages['notaFiscal.label.naturezaOperacao']}: "
						for="naturezaOperacao" styleClass="text-input" />

					<h:inputText id="naturezaOperacao"
						value="#{notaFiscalEditMB.bean.naturezaOperacao}"
						title="#{messages['notaFiscal.alt.naturezaOperacao']}"
						disabled="true" />

					<p:message for="naturezaOperacao" />

					<h:outputLabel value="#{messages['notaFiscal.label.modelo']}: "
						for="modelo" styleClass="text-input" />

					<h:inputText id="modelo" value="#{notaFiscalEditMB.bean.modelo}"
						title="#{messages['notaFiscal.alt.modelo']}" disabled="true" />

					<p:message for="modelo" />

					<h:outputLabel value="#{messages['notaFiscal.label.serie']}: "
						for="serie" styleClass="text-input" />

					<h:inputText id="serie" value="#{notaFiscalEditMB.bean.serie}"
						title="#{messages['notaFiscal.alt.serie']}" disabled="true" />

					<p:message for="serie" />

					<h:outputLabel value="#{messages['notaFiscal.label.numero']}: "
						for="numero" styleClass="text-input" />

					<h:inputText id="numero" value="#{notaFiscalEditMB.bean.numero}"
						title="#{messages['notaFiscal.alt.numero']}" disabled="true" />

					<p:message for="numero" />

					<h:outputLabel
						value="#{messages['notaFiscal.label.dataEmissao']}: "
						for="dataEmissao" styleClass="text-input" />

					<p:calendar id="dataEmissao"
						value="#{notaFiscalEditMB.bean.dataEmissao}"
						pattern="#{messages['label.date.pattern']}" navigator="true"
						showButtonPanel="true" locale="#{locales.currentLocale}"
						title="#{messages['notaFiscal.alt.dataEmissao']}" disabled="true" />

					<p:message for="dataEmissao" />

					<h:outputLabel
						value="#{messages['notaFiscal.label.tipoEmissao']}: "
						for="tipoEmissao" styleClass="text-input" />

					<h:inputText id="tipoEmissao"
						value="#{notaFiscalEditMB.bean.tipoEmissao}"
						title="#{messages['notaFiscal.alt.tipoEmissao']}" disabled="true" />

					<p:message for="tipoEmissao" />

					<h:outputLabel
						value="#{messages['notaFiscal.label.valorTotalNota']}: "
						for="valorTotalNota" styleClass="text-input" />

					<h:inputText id="valorTotalNota"
						value="#{notaFiscalEditMB.bean.valorTotalNota}"
						title="#{messages['notaFiscal.alt.valorTotalNota']}"
						disabled="true">
						<f:convertNumber pattern="#{messages['label.valor.pattern']}" />
					</h:inputText>

					<p:message for="valorTotalNota" />

					<h:outputLabel
						value="#{messages['notaFiscal.label.valorTotalTributos']}: "
						for="valorTotalTributos" styleClass="text-input" />

					<h:inputText id="valorTotalTributos"
						value="#{notaFiscalEditMB.bean.valorTotalTributos}"
						title="#{messages['notaFiscal.alt.valorTotalTributos']}"
						disabled="true">
						<f:convertNumber pattern="#{messages['label.valor.pattern']}" />
					</h:inputText>

					<p:message for="valorTotalTributos" />

					<h:outputLabel value="#{messages['cliente.label']}: "
						styleClass="text-input" />
					<h:outputLabel
						value="#{notaFiscalEditMB.bean.clienteNotaFiscal.documento}"
						styleClass="text-input">
						<f:converter converterId="CnpjCpfConverter" />
					</h:outputLabel>
					<h:outputLabel
						value="#{notaFiscalEditMB.bean.clienteNotaFiscal.nome}"
						styleClass="text-input" />

				</h:panelGrid>
				<p:dataTable id="list" var="bean"
					value="#{notaFiscalEditMB.bean.itemNotaFiscal}">
					<f:facet name="header">#{messages['itemNotaFiscal.list.table.title']}</f:facet>
					<p:column width="15%">
						<f:facet name="header">#{messages['produto.label.codigo']}</f:facet>
						<h:outputText value="#{bean.produto.codigo}" />
					</p:column>
					<p:column width="25%">
						<f:facet name="header">#{messages['itemNotaFiscal.label.produto']}</f:facet>
						<h:outputText value="#{bean.produto.nome}" />
					</p:column>
					<p:column width="8%">
						<f:facet name="header">#{messages['itemNotaFiscal.label.quantidade']}</f:facet>
						<h:outputText value="#{bean.quantidade}" >
							<f:convertNumber  pattern="#{messages['label.quantidade.pattern']}"/>
						</h:outputText>
					</p:column>
					<p:column width="10%">
						<f:facet name="header">#{messages['itemNotaFiscal.label.valorUnitario']}</f:facet>
						<h:outputText value="#{bean.valorUnitario}" >
							<f:convertNumber  pattern="#{messages['label.numerico.pattern']}"/>
						</h:outputText>
					</p:column>
					<p:column width="10%">
						<f:facet name="header">#{messages['itemNotaFiscal.label.valorTotal']}</f:facet>
						<h:outputText value="#{bean.valorTotal}" >
							<f:convertNumber  pattern="#{messages['label.numerico.pattern']}"/>
						</h:outputText>
					</p:column>
					<p:column width="10%">
						<f:facet name="header">#{messages['itemNotaFiscal.label.valorTotalTributos']}</f:facet>
						<h:outputText value="#{bean.valorTotalTributos}" >
							<f:convertNumber  pattern="#{messages['label.numerico.pattern']}"/>
						</h:outputText>
					</p:column>
				</p:dataTable>
			</p:fieldset>

		</h:form>
	</ui:define>
</ui:composition>